import { isEmpty } from './is-empty'

/**
 * 判断数组中是否包含某个值
 *
 * @param {any[]} arr 需要进行判断的数组
 * @param value 需要判断是否包含在数组中的值
 * @returns {boolean} true 为包含，false 为不包含
 */
export const isIncludeIn = (arr: any[], value: any): boolean => !isEmpty(arr) && arr.includes(value)

export type IsIncludeInArrType = typeof isIncludeIn
